package com.yuju.rpt.enums;

/**
 * 类名：CheckinRoomTypeReturnEnum  <br />
 *
 * 功能：
 *
 * @author : jiaokn <br />
 * @Date : 2018年2月3日 下午5:02:19  <br />
 * @version : 1.1 <br />
 */
public enum CheckinRoomTypeReturnEnum {
	
	CHECKINROOMTYPE_SAVE_SUCCESS("yuju-checkinRoomType-1001", "按房型入住分析报表保存成功"),
	CHECKINROOMTYPE_SAVE_FAILURE("yuju-checkinRoomType-1002", "按房型入住分析报表保存失败"),
	CHECKINROOMTYPE_GET_SUCCESS("yuju-checkinRoomType-1003", "按房型入住分析报表查询成功"),
	CHECKINROOMTYPE_GET_FAILURE("yuju-checkinRoomType-1004", "按房型入住分析报表查询失败"),
	CHECKINROOMTYPE_SUM_SUCCESS("yuju-checkinRoomType-1005", "报表总计查询成功"),
	CHECKINROOMTYPE_SUM_FAILURE("yuju-checkinRoomType-1006", "报表总计查询失败");
		
	private String code;
	private String desc;
	
	CheckinRoomTypeReturnEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (CheckinRoomTypeReturnEnum enume : CheckinRoomTypeReturnEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
